package com.haha.community.service;

import com.haha.community.entity.Message;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Yang
 * @since 2020-10-30
 */
public interface MessageService extends IService<Message> {

    int findConversationCount(Integer id);

    List<Message> findConversations(Integer id, int offset, int limit);

    Integer findLetterCount(String conversationId);

    int findLetterUnreadCount(Integer id, String conversationId);

    List<Message> findLetters(String conversationId, int offset, int limit);

    void readMessage(List<Integer> ids);

    void addMessage(Message message);
}
